﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 多态2
{
    class Square:Shape
    {
        protected double sideLen;
        public double SideLen { get => sideLen; set => sideLen = value; }
        public Square(double sideLen,string color):base(color)
        {
            this.sideLen = sideLen;
        }
        public override void GetArea()
        {
            Console.WriteLine("{0}*{1}={2}",sideLen,sideLen,sideLen*sideLen);
            Console.WriteLine("颜色为："+color);
        }
    }
}
